﻿<Window x:Class="EPE.WPF.ShopsPriceSystemAddForm"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
        Title="添加商铺价格系数信息" Height="330" Width="600" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
    <Grid>
        <GroupBox Header="价格系数信息" Grid.Row="1" Style="{StaticResource GroupBoxStyle}" Margin="5">
            <Grid Style="{StaticResource BorderGridStyle}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="80"></ColumnDefinition>
                    <ColumnDefinition Width="150"></ColumnDefinition>
                    <ColumnDefinition Width="80"></ColumnDefinition>
                    <ColumnDefinition Width="150"></ColumnDefinition>
                    <ColumnDefinition Width="120" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>

                    <RowDefinition Height="*"></RowDefinition>
                </Grid.RowDefinitions>

                <Label Content="项目" Grid.Row="0" Grid.Column="0" VerticalAlignment="Top"/>
                <StackPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3" Orientation="Horizontal">
                    <TextBox  Name="txtProject" Width="225" Style="{StaticResource TextBox200}"></TextBox>
                    <Button Name="btnSelect" Style="{StaticResource ButtonStyle}"  Click="btnSelect_Click">
                        <StackPanel Orientation="Horizontal" >
                            <Image Source="/resources/image/close06.png" Stretch="Fill" Style="{StaticResource ButtonImageStyle}"></Image>
                            <Label Content="选择" HorizontalAlignment="Center" Style="{StaticResource ButtonLabelStyle}"></Label>
                        </StackPanel>
                    </Button>
                    <Label Name="lblProjectId" Visibility="Hidden"></Label>
                </StackPanel>
                <Label Content="名称" Grid.Row="1" Grid.Column="0" VerticalAlignment="Top"/>
                <TextBox Name="txtName" Grid.Row="1" Grid.Column="1"  VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />
                <Label Content="值" Grid.Row="1" Grid.Column="2" VerticalAlignment="Top"/>
                <TextBox Name="txtValue" Grid.Row="1" Grid.Column="3"  VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />


                <Label Content="基数" Grid.Row="2" Grid.Column="0" VerticalAlignment="Top"/>
                <TextBox Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="3" x:Name="txtBasePara" PreviewMouseDown="txtBasePara_PreviewMouseDown" HorizontalAlignment="Left" Margin="0,0,0,0" Width="300">
                    <TextBox.Style>
                        <Style >
                            <Setter Property="Control.Template">
                                <Setter.Value>
                                    <ControlTemplate TargetType="{x:Type TextBox}">
                                        <Microsoft_Windows_Themes:ListBoxChrome Background="{TemplateBinding Control.Background}" BorderBrush="{TemplateBinding Control.BorderBrush}" BorderThickness="{TemplateBinding Control.BorderThickness}" Name="Bd" RenderFocused="{TemplateBinding UIElement.IsKeyboardFocusWithin}" RenderMouseOver="{TemplateBinding UIElement.IsMouseOver}" SnapsToDevicePixels="true">
                                            <Grid>
                                                <Border BorderBrush="Transparent" BorderThickness="1" Margin="0,0,20,0" Name="PART_ContentHostBD">
                                                    <ScrollViewer Name="PART_ContentHost" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
                                                </Border>
                                                <Button BorderBrush="{x:Null}"  Focusable="False" FontSize="12"  HorizontalAlignment="Right" VerticalAlignment="Center" Width="80" Name="btnSel" Click="btnSel_Click" >
                                                    <StackPanel Orientation="Horizontal" >
                                                        <Image Source="/resources/image/close06.png" Stretch="Fill" Style="{StaticResource ButtonImageStyle}"></Image>
                                                        <Label Content="选择" HorizontalAlignment="Center" Style="{StaticResource ButtonLabelStyle}"></Label>
                                                    </StackPanel>
                                                </Button>
                                            </Grid>
                                        </Microsoft_Windows_Themes:ListBoxChrome>
                                        <ControlTemplate.Triggers>
                                            <Trigger Property="UIElement.IsEnabled" Value="false">
                                                <Setter Property="Microsoft_Windows_Themes:ListBoxChrome.Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
                                                <Setter Property="Control.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                                            </Trigger>
                                            <Trigger Property="UIElement.IsMouseOver" Value="true">
                                                <Setter Property="Border.BorderBrush" TargetName="PART_ContentHostBD" Value="LightBlue" />
                                            </Trigger>
                                        </ControlTemplate.Triggers>
                                    </ControlTemplate>
                                </Setter.Value>
                            </Setter>
                        </Style>
                    </TextBox.Style>
                </TextBox>
                <Popup Grid.Row="3" x:Name="PopupBasePara" AllowsTransparency="True" IsOpen="False">
                    <TreeView x:Name="tvBasePara"  Initialized="tvBasePara_Initialized" SelectedItemChanged="tvBasePara_SelectedItemChanged">
                       
                    </TreeView>
                </Popup>
                <Label Content="影响因素" Grid.Row="3" Grid.Column="2" VerticalAlignment="Top"/>
                <TextBox Name="txtProperty" Grid.Row="3" Grid.Column="3"  VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />
                <Label Content="备注" Grid.Row="3" Grid.Column="0" VerticalAlignment="Top"/>
                <TextBox Name="txtComment" Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="3"  VerticalAlignment="Center" Style="{StaticResource TextBoxStyle}" />



                <StackPanel  Grid.Row="4" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal" >
                    <Button Name="btnSave"  Style="{StaticResource ButtonStyle}" Click="btnSave_Click">
                        <StackPanel Orientation="Horizontal" >
                            <Image Source="/resources/image/close05.png" Stretch="Fill" Style="{StaticResource ButtonImageStyle}"></Image>
                            <Label Content="保存" HorizontalAlignment="Center"  Style="{StaticResource ButtonLabelStyle}"></Label>
                        </StackPanel>
                    </Button>
                    <Button Name="btnClose"   Style="{StaticResource ButtonStyle}" Click="btnClose_Click">
                        <StackPanel Orientation="Horizontal" >
                            <Image Source="/resources/image/close07.png" Stretch="Fill" Style="{StaticResource ButtonImageStyle}"></Image>
                            <Label Content="取消"  HorizontalAlignment="Center"  Style="{StaticResource ButtonLabelStyle}"></Label>
                        </StackPanel>
                    </Button>
                </StackPanel>

            </Grid>
        </GroupBox>
    </Grid>
</Window>
